package com.hy.hyaudio.opensles

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.hy.hyaudio.databinding.ActivityHomeOpenslEsBinding

/**
 * @Description:
 * @Author: wdk
 * @CreateTime: 2025/1/3 22:56
 */
class OpenSLESHomeActivity : AppCompatActivity() {

    private lateinit var binding: ActivityHomeOpenslEsBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityHomeOpenslEsBinding.inflate(layoutInflater)
        setContentView(binding.root)

        initListener()
    }

    private fun initListener() {
        //openSL ES录音功能
        binding.tvOpenSLESRecorder.setOnClickListener {
            val intent = Intent(this, OpenSLESRecorderActivity::class.java)
            startActivity(intent)
        }

        binding.tvOpenSLESPlayer.setOnClickListener {
            val intent = Intent(this, OpenSLESPlayerActivity::class.java)
            startActivity(intent)
        }
    }

}